<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<link rel="stylesheet" type="text/css" href="${ctx}/js/jquery/jquery-easyui-1.2.5/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="${ctx}/js/jquery/jquery-easyui-1.2.5/themes/gray/easyui.css" />
<link rel="stylesheet" type="text/css" href="${ctx}/css/back.css" />
<link href="${ctx}/img/favicon.ico" rel="shortcut icon" />
<link href="${ctx}/img/favicon.ico" rel="icon" />
<link href="${ctx}/img/favicon.ico" rel="bookmark" />
<script type="text/javascript" src="${ctx}/js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="${ctx}/js/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="${ctx}/js/jquery/jquery-easyui-1.2.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/jquery/jquery-easyui-1.2.5/diy.validatebox.js"></script>
<script type="text/javascript" src="${ctx}/js/jquery/jquery-easyui-1.2.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="${ctx}/js/common.js"></script>
<script type="text/javascript">
	var ctx = "${ctx}";//上下文
	
	/** Session过期需要调用的方法，返回登录框 */
	function login(){
		var r = $('#loginForm').form('validate');
		if(!r) {
			return false;
		}
		var url="${ctx}/admin/login.adm";
		var param = "adminName="+$('#adminName').val();
		param += "&adminPwd="+$('#adminPwd').val();
		$.post(url,param,function(data){
		$('#loginForm').form('clear');
			if(data.success){//操作成功
				location.reload();	
			}else{
				$.messager.alert('提示',data.msg,'warning');	
			}
		});
	}
	
	/**
	 * 打开文件上传对话框
	 * @param setting 
	 * {target:"",
	 * fieldName:"file",
	 * fileExt:""
	 * }
	 */
	function openUpload(setting){
		 var ps=
		 $.extend({
			 target:'uploadWindow',
			 fieldName:'file',
			 fileExt:''
		 },setting);
		$("#"+ps.target).window({
  			title:'上传文件',
  			content:'<iframe id="uploadFrame" scrolling="no" frameborder="0" src="${ctx}/pages/common/upload.jsp?fieldName='+ps.fieldName+'&fileExt='+ps.fileExt+'" ' +
  				'orgSrc="${ctx}/pages/common/upload.jsp?fieldName='+ps.fieldName+'&fileExt='+ps.fileExt+'" style="width:100%;height:100%;"></frame>',
  			width:350,
  			height:120,
  			modal:true,
  			shadow:false,
  			minimizable:false,
  			cache:false,
  			maximizable:true,
  			collapsible:false,
  			resizable:false,
  			onLoad: function(){
  				
  			} 			
  		});
	}
</script>
 